package com.fanqiechaodan.decorator;

/**
 * @author fanqiechaodan
 * @Classname Demo
 * @Description 装饰模式
 */
public class Demo {

    public static void main(String[] args) {
        // 普通车
        Car basicCar = new BasicCar();
        basicCar.assemble();

        // SUV
        Car suvCar = new SuvCar(basicCar);
        suvCar.assemble();

        // 豪车
        Car luxuryCar = new LuxuryCar(basicCar);
        luxuryCar.assemble();
    }
}
